{{define "title"}}LUCI Scheduler{{end}}

{{define "head"}}
<style type="text/css">
#jobs-table {
  table-layout: fixed;
}
#jobs-table td.long {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>
{{end}}

{{define "content"}}

<ol class="breadcrumb">
  <li class="breadcrumb-item active">All projects</li>
</ol>

<div class="row">
  <div class="col-sm-12">
    <table class="table" id="jobs-table">
      <thead>
        <tr>
          <th>Project</th>
          <th style="width: 160px;">Running</th>
          <th style="width: 160px;">Scheduled</th>
          <th style="width: 160px;">Waiting</th>
          <th style="width: 160px;">Paused</th>
        </tr>
      </thead>
      <tbody>
      {{range .Projects }}
        <tr>
          <td><a href="/jobs/{{.ProjectID}}">{{.ProjectID}}</a></td>
          <td><a href="/jobs/{{.ProjectID}}?filter=running" class="underline label label-info">{{JobCount .Running}}</a></td>
          <td><a href="/jobs/{{.ProjectID}}?filter=scheduled" class="underline label label-primary">{{JobCount .Scheduled}}</a></td>
          <td><a href="/jobs/{{.ProjectID}}?filter=waiting" class="underline label label-warning">{{JobCount .Waiting}}</a></td>
          <td><a href="/jobs/{{.ProjectID}}?filter=paused" class="underline label label-default">{{JobCount .Paused}}</a></td>
        </tr>
      {{end}}
      </tbody>
    </table>
  </div>
</div>

{{end}}
